 
	//手机号码验证
	jQuery.validator.addMethod("ismobile", function(value, element) {   
	     var length = value.length;      
	     var mobile = /^(((13[0-9]{1})|(15[0-9]{1}))+\d{8})$/;      
	     return (length == 11 && mobile.exec(value))? true:false;   
	 }, "请正确填写您的手机号码");
	
	//QQ号码验证   
	jQuery.validator.addMethod("qq", function(value, element) {
	    var tel = /^[1-9]\d{4,9}$/;
	    return this.optional(element) || (tel.test(value));
	}, "qq号码格式错误");
	
	// IP地址验证
	jQuery.validator.addMethod("ip", function(value, element) {
	    var ip = /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
	    return this.optional(element) || (ip.test(value) && (RegExp.$1 < 256 && RegExp.$2 < 256 && RegExp.$3 < 256 && RegExp.$4 < 256));
	}, "Ip地址格式如：192.168.1.1");
	
	//hh:mm验证
	jQuery.validator.addMethod("hhmm", function(value, element) {
	    var hhmm = /^([01]\d|2[01234]):([0-5]\d|60)$/;
	    return this.optional(element) || (hhmm.test(value));
	}, "时间格式如：08：30（“：”用英文）" );
	
	//字符验证
	jQuery.validator.addMethod("ischar", function(value, element) {
	    var hhmm = /^[a-zA-z]+$/;
	    return this.optional(element) || (hhmm.test(value));
	}, "请输入字符比如'a-z'或'A-Z'" );
	
	//身份证
	jQuery.validator.addMethod("isCd", function(value, element) {   
	      var tel = /^[\d]{6}(19|20)*[\d]{2}((0[1-9])|(11|12))([012][\d]|(30|31))[\d]{3}[xX\d]*$/;
	      return this.optional(element) || (tel.test(value));
	 }, "请正确填写您的身份证");
	 
	//范围选择验证
	jQuery.validator.addMethod("selectRange", function(value, element) { 
				var flag=true;  
 				var val=eval(element.name+'_SELECT').getValue();
				if((val==8||val==5)&&($("#FIELD_MAX").val()==""||$("#FIELD_MIN").val()=="")){
					flag= false;
				}
	      return this.optional(element) || flag;
	 }, "请输入最大值和最小值验证。");
	 
	 //日期范围
	jQuery.validator.addMethod("dateRange", function(value, element,param) { 
				var flag=true;  
				if(value!=""){
					flag=!dateCompare($('#'+param[0]).val(),$('#'+param[1]).val(),value);
				}
	      return this.optional(element) || flag;
	 }, "输入日期范围不在指定范围内");
	 
	//表名验证   
	jQuery.validator.addMethod("isTableName", function(value, element) {
	    var tel = /^[A-Z]+[A-Z_]*$/;
	    return this.optional(element) || (tel.test(value));
	}, "表名格式错误");
	
	//字段名验证   
	jQuery.validator.addMethod("isColName", function(value, element) {
	    var tel = /^[a-zA-Z]+[a-zA-Z_\d]*$/;
	    return this.optional(element) || (tel.test(value));
	}, "字段名格式错误");
	
 
